package tech.heptagram.staff.model.enums;


import tech.heptagram.staff.exception.EnumParseException;

public enum StaffType {

    FORMAL(1, "正编"),
    TRAINEE(2, "实习生"),
    LAOWU(3, "劳务"),
    OTHER(10, "其他"),

    DEFAULT(0, "默认值,表示未设置");

    private Integer value;
    private String desc;

    StaffType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return this.value;
    }

    public String getDesc() {
        return this.desc;
    }

    public static StaffType valueOf(Integer value) {
        for (StaffType type : StaffType.values()) {
            if (type.getValue() == value) {
                return type;
            }
        }
        return null;
    }
}
